package com.allo2o.common.convertor;

import com.allo2o.common.VO.UserCertVO;
import com.allo2o.common.domain.UserCertDO;
import org.springframework.beans.BeanUtils;

/**
 * <ul>
 *     use cert info CONVERTOR
 * </ul>
 * Created by lubingbing on 16-5-4.
 */
public class UserCertConvertor {
    public static UserCertVO DO2VOConvert(UserCertDO dto) {
        if (dto == null) {
            return null;
        }
        UserCertVO vo = new UserCertVO();
        BeanUtils.copyProperties(dto, vo);
        return vo;
    }

    public static UserCertDO VO2DOConvert(UserCertVO vo) {
        if (vo == null) {
            return null;
        }
        UserCertDO dto = new UserCertDO();
        BeanUtils.copyProperties(vo, dto);
        return dto;
    }
}
